<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="b2BuoyancyController,Box2D.Dynamics.Controllers.b2BuoyancyController,angularDrag,density,gravity,linearDrag,normal,offset,useDensity,useWorldGravity,velocity,Draw,Step" name="keywords">
<title>Box2D.Dynamics.Controllers.b2BuoyancyController</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'b2BuoyancyController - Box2DFlash Documentation';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Box2DFlash Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?Box2D/Dynamics/Controllers/b2BuoyancyController.html&amp;Box2D/Dynamics/Controllers/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;b2BuoyancyController</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class b2BuoyancyController"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">Box2D.Dynamics.Controllers</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class b2BuoyancyController</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">b2BuoyancyController <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> <a href="b2Controller.html">b2Controller</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Source</td><td><a href="http://box2dflash.svn.sourceforge.net/viewvc/box2dflash/Source/Box2D/Dynamics/Controllers/b2BuoyancyController.as">b2BuoyancyController.as</a></td>
</tr>
</table>
<p></p>
 Calculates buoyancy forces for fluids in the form of a half plane
 <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#angularDrag">angularDrag</a> : Number = 1<div class="summaryTableDescription">
  Linear drag co-efficient
  </div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#density">density</a> : Number = 0<div class="summaryTableDescription">
  The fluid density
  </div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#gravity">gravity</a> : <a href="../../Common/Math/b2Vec2.html">b2Vec2</a> = null<div class="summaryTableDescription">
  Gravity vector, if the world's gravity is not used
  </div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#linearDrag">linearDrag</a> : Number = 2<div class="summaryTableDescription">
  Linear drag co-efficient
  </div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#normal">normal</a> : <a href="../../Common/Math/b2Vec2.html">b2Vec2</a>
<div class="summaryTableDescription">
  The outer surface normal
  </div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#offset">offset</a> : Number = 0<div class="summaryTableDescription">
  The height of the fluid surface along the normal
  </div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#useDensity">useDensity</a> : Boolean = false<div class="summaryTableDescription">
  If false, bodies are assumed to be uniformly dense, otherwise use the shapes densities
  </div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#useWorldGravity">useWorldGravity</a> : Boolean = true<div class="summaryTableDescription">
  If true, gravity is taken from the world instead of the gravity parameter.</div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#velocity">velocity</a> : <a href="../../Common/Math/b2Vec2.html">b2Vec2</a>
<div class="summaryTableDescription">
  Fluid velocity, for drag calculations
  </div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
</table>
</div>
<a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Properties</div>
<div class="showHideLinks">
<div class="hideInheritedProtectedProperty" id="hideInheritedProtectedProperty">
<a onclick="javascript:setInheritedVisible(false,'ProtectedProperty');" href="#protectedPropertySummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Protected Properties</a>
</div>
<div class="showInheritedProtectedProperty" id="showInheritedProtectedProperty">
<a onclick="javascript:setInheritedVisible(true,'ProtectedProperty');" href="#protectedPropertySummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Protected Properties</a>
</div>
</div>
<table id="summaryTableProtectedProperty" class="summaryTable hideInheritedProtectedProperty" cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedProtectedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="b2Controller.html#m_bodyCount">m_bodyCount</a> : int<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol"><a href="b2Controller.html">b2Controller</a></td>
</tr>
<tr class="hideInheritedProtectedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="b2Controller.html#m_bodyList">m_bodyList</a> : <a href="../Controllers/b2ControllerEdge.html">b2ControllerEdge</a>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol"><a href="b2Controller.html">b2Controller</a></td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<div class="showHideLinks">
<div class="hideInheritedMethod" id="hideInheritedMethod">
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Methods</a>
</div>
<div class="showInheritedMethod" id="showInheritedMethod">
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Methods</a>
</div>
</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="b2Controller.html#AddBody()">AddBody</a>(body:<a href="../../Dynamics/b2Body.html">b2Body</a>):void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol"><a href="b2Controller.html">b2Controller</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="b2Controller.html#Clear()">Clear</a>():void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol"><a href="b2Controller.html">b2Controller</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Draw()">Draw</a>(debugDraw:<a href="../b2DebugDraw.html">b2DebugDraw</a>):void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="b2Controller.html#GetBodyList()">GetBodyList</a>():<a href="../Controllers/b2ControllerEdge.html">b2ControllerEdge</a>
</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol"><a href="b2Controller.html">b2Controller</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="b2Controller.html#GetNext()">GetNext</a>():<a href="../Controllers/b2Controller.html">b2Controller</a>
</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol"><a href="b2Controller.html">b2Controller</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="b2Controller.html#GetWorld()">GetWorld</a>():<a href="../../Dynamics/b2World.html">b2World</a>
</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol"><a href="b2Controller.html">b2Controller</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="b2Controller.html#RemoveBody()">RemoveBody</a>(body:<a href="../../Dynamics/b2Body.html">b2Body</a>):void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol"><a href="b2Controller.html">b2Controller</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Step()">Step</a>(step:b2TimeStep):void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">b2BuoyancyController</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="angularDrag"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">angularDrag</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var angularDrag:Number = 1</code><p>
  Linear drag co-efficient
  </p></div>
<a name="density"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">density</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var density:Number = 0</code><p>
  The fluid density
  </p></div>
<a name="gravity"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">gravity</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var gravity:<a href="../../Common/Math/b2Vec2.html">b2Vec2</a> = null</code><p>
  Gravity vector, if the world's gravity is not used
  </p></div>
<a name="linearDrag"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">linearDrag</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var linearDrag:Number = 2</code><p>
  Linear drag co-efficient
  </p></div>
<a name="normal"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">normal</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var normal:<a href="../../Common/Math/b2Vec2.html">b2Vec2</a></code><p>
  The outer surface normal
  </p></div>
<a name="offset"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">offset</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var offset:Number = 0</code><p>
  The height of the fluid surface along the normal
  </p></div>
<a name="useDensity"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">useDensity</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var useDensity:Boolean = false</code><p>
  If false, bodies are assumed to be uniformly dense, otherwise use the shapes densities
  </p></div>
<a name="useWorldGravity"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">useWorldGravity</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var useWorldGravity:Boolean = true</code><p>
  If true, gravity is taken from the world instead of the gravity parameter.
  </p></div>
<a name="velocity"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">velocity</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var velocity:<a href="../../Common/Math/b2Vec2.html">b2Vec2</a></code><p>
  Fluid velocity, for drag calculations
  </p></div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="Draw()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Draw</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public override function Draw(debugDraw:<a href="../b2DebugDraw.html">b2DebugDraw</a>):void</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">debugDraw</span>:<a href="../b2DebugDraw.html">b2DebugDraw</a></code></td>
</tr>
</table>
</div>
<a name="Step()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Step</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public override function Step(step:b2TimeStep):void</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">step</span>:b2TimeStep</code></td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">Box2DFlash 2.1a</center>
</div>
</body>
</html>
<!--Box2DFlash 2.1a-->
